package main

import "fmt"

func main() {
	DB.Config.Logger = mysqlLogger
	var count int64
	var uu []Student
	//会先执行 SELECT count(*) FROM `t_student`
	//再执行 SELECT count(*) FROM `t_student`
	err := DB.Model(new(Student)).Count(&count).Offset(3).Limit(5).Find(&uu).Error
	if err != nil {
		panic(err)
	}
	fmt.Println("count:", count)
	fmt.Println("uu:", uu)
}
